SHELL: Write NGINX Service Control script, shell: Write nginx script
Nginx installed in the source code package cannot use "service nginx start" or "/etc/init. d/nginx start" for operations and control. Therefore, the following service control script is written.
You can use
This time, the simplest form of the script will be implemented. The script has only commands, labels, and jumps, and it looks like a compilation, but it's good to read. Although the syntax of this scripting language is very simple, the most basic elements are still available.
As a scripting engine, the script itself is best not to involve specific areas in order
second method of execution allows the shell file permissions to be added to the executable and then run directly [[emailprotected] 0614]# chmod u+x examp Le.sh[[emailprotected] 0614]#./example.sh/home/hk/0614total 20-rw-r--r--. 1 root root June 17:32 Aaa.txt-rw-r--r--. 1 root root 0 June 16:17 Abc.txt-rw-r--r--. 1 root root 0 June 16:23 Bbb.txt-rw-r--r--. 1 root root 0 June 16:27 Ccc.txt-rwxr--r--. 1 root root June 17:51 Example.sh-rw-rw-r--. 1 HK HK 4731 June 09:10 openman.txt-rw-Rw-r--. 1 HK
1. Write a shell script and a shell script
I. shell and shell scripts
In linux, the text starting with #/bin/bash is interpreted by the shell interpreter.
Shell is an application that provides an interface through which users can access the services of the operating system kernel.
Shell script is a
Note that this article does not involve too many configuration problems, the younger brother just to install the EDM server example to write Shellscript scripting aspects.In fact, the forum has been registered nearly 4 years, has not been good to write a blog post, one of the blame himself too lazy, and his writing is also poor, do not know what to write somethin
ProcessNote that since there is a collection in the PID, there is no need to write a for loop if there are multiple Gradledaemon processesPaste the following. bat script@echo off echo ------------------------------------------echo Liferay Kill all Gradle Daemon Process Kit echo ------------------------------------------ for in ('calljps^| find/i "Gradledaemon"'doecho %%i taskkill/f/pid%%i)In addition, s
TopicFTP is often used in daily work, sharing and downloading files, for some unfamiliar with ftp command line personnelUsing FTP for Shared file management is a headache.and FTP If some files need to be uploaded or downloaded regularly every day, it is meaningless for people to repeat the same work.So how do I write a script that automatically downloads or uploads ftp files?Answer reference: 1. ftpput.sh u
second method of execution allows the shell file permissions to be added to the executable and then run directly [[emailprotected] 0614]# chmod u+x examp Le.sh[[emailprotected] 0614]#./example.sh/home/hk/0614total 20-rw-r--r--. 1 root root June 17:32 Aaa.txt-rw-r--r--. 1 root root 0 June 16:17 Abc.txt-rw-r--r--. 1 root root 0 June 16:23 Bbb.txt-rw-r--r--. 1 root root 0 June 16:27 Ccc.txt-rwxr--r--. 1 root root June 17:51 Example.sh-rw-rw-r--. 1 HK HK 4731 June 09:10 openman.txt-rw-Rw-r--. 1 HK
You can see in this article: http://www.bkjia.com/Article/201102/83631.html
If the ewebeditor filters scripts such as asa, cer, cdx, php, and aspx, add an ashx upload type and upload an ashx script. The script content is as follows:Using System;Using System. Web;Using System. IO;Public class Handler: IHttpHandler {
Public void ProcessRequest (HttpContext context ){Context. Response. ContentType = "text/pl
() iflen (input) ==0:continues.send (Input) input=input.split () ifInput[0]== ' Get ':print ' getfile withopen (input[1], ' WB ') asf:Nbsp;f.write (S.RECV (1024x768)) Time.sleep (0.2) ifs.recv (1024x768) == "OOK": print "downfinshnbsp ..." continue NBSP;NBSP;DATANBSP;=NBSP;S.RECV (1024x768) printdataI've been learning Python all the time, but it's always intermittent. Can't insist. Learn for a long time to write a simple socket, this IQ let people
The following is a script for the installation and modification of nginx.conf scripts written by the shell script, which is relatively simple:#!/bin/bashfunction Yum_install () {Yum Install Epel-release-yYum Install Nginx-y}Yum_installPw=/etc/nginx/nginx.confRead-p "Please enter group name:" zuRead-p "Please enter the first IP address:" Ip1Read-p "Please enter a second IP address:" IP2Read-p "Please enter a
What is a Shell script? The simplest explanation is that a shell script is a file that contains a series of commands. The shell reads the file and executes all the commands in the file as if the commands were entered directly into the command line.The Shell is unique because it is not only a powerful command-line interface, but also a scripting language interpreter. As we'll see, most of the tasks that can
Write a script:1. Create a directory/tmp/scripts2. Switch the working directory to this directory.3. Copy the/etc/PAM. d directory to the current directory and run the test command again.4. Change the owner of test and its files and subdirectories to RedHat.5. Change the permissions of other users of files in the test and its subdirectories to No permissions.
Write
Author: cym
As we all know, the importance of scripts is self-evident, especially in game engine development,
Maybe the physical, artificial intelligence, animation, sound effects, and special effects of a game engine can be implemented using a third-party library, but the script engine cannot be a third-party one. You must write it yourself.
With the script engi
who can write a well-written j2_game will surely be able to write the same well for iOS and Android games. When reading this article, please take a look at your company's situation. You may find that your technical director can get started with unity3d game development cocos2d game development in two or three days, this is not a thorough understanding of the game platform, but a strong control of the game
entering:./filename.
Note
During shell programming, a sentence starting with # represents a comment until the end of this line. We sincerely recommend that you use annotations in your program. If you have used annotations, you can understand the role and working principle of the script in a short time even if the script is not used for a long time.
Variable
You must use variables in other programming langu
Label: Bash script
Shell is a scripting language for control systems. Bash is one of the shell interpreter and the most popular one in Linux. However, there are many shell interpreters, and each type has its own characteristics, not exactly the same ..,
Common shell:
Sh, CSH, tcsh, Bash, KSh, Dash, zsh
Common bash shortcut keys:
CTRL + A: Jump to the beginning of the command line
CTRL + E: jump to the end of the command line
CTRL +
Write a robust bash scriptMany people use shell scripts to accomplish simple tasks and become part of their lives. Unfortunately, shell scripts can be very much affected by running exceptions. It is necessary to minimize such problems when writing scripts. In this article I'll cover some of the techniques that make bash scripts robust.Using Set-u www.ahlinux.comHow many times have you crashed the script bec
Turn from: The world of the Intelligence ReporterThis article combines a number of examples to illustrate how to write a shell script.Why Shell ProgrammingIn Linux systems, although there are a variety of graphical interface tools, sell is still a very flexible tool. The shell is not just a collection of commands, but also a great programming language. You can automate a large number of tasks by using the shell, which is particularly well-suited to sy
where the script resides;(3) The dot number is used to execute a script, even if the script does not have executable permissions to run;If you do not have execute permissions, the "./" execution will report a permission error, but the previous use of the dot number execution will not error;#. ./99.sh(4) The souce command can also read and execute scripts in the
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.